package com.wanghengzhi.design.patterns.creational.abstractfactory;

/**
 * @author wanghengzhi
 * @since 2020.11.6
 */
public class FactoryProducer {

    private static final String SHAPE = "SHAPE";
    private static final String COLOR = "COLOR";

    public static AbstractFactory getFactory(String choice){
        if(SHAPE.equalsIgnoreCase(choice)){
            return new ShapeFactory();
        } else if(COLOR.equalsIgnoreCase(choice)){
            return new ColorFactory();
        }
        return null;
    }
}
